Optimal. Leaf size=52 \[ \frac{(a B+A b) \sin (c+d x)}{d}+\frac{1}{2} x (2 a A+b B)+\frac{b B \sin (c+d x) \cos (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0228202, antiderivative size = 52, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.048, Rules used = {2734} \[ \frac{(a B+A b) \sin (c+d x)}{d}+\frac{1}{2} x (2 a A+b B)+\frac{b B \sin (c+d x) \cos (c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2734
Rubi steps
\begin{align*} \int (a+b \cos (c+d x)) (A+B \cos (c+d x)) \, dx &=\frac{1}{2} (2 a A+b B) x+\frac{(A b+a B) \sin (c+d x)}{d}+\frac{b B \cos (c+d x) \sin (c+d x)}{2 d}\\ \end{align*}
Mathematica [A] time = 0.0839046, size = 51, normalized size = 0.98 \[ \frac{4 (a B+A b) \sin (c+d x)+4 a A d x+b B \sin (2 (c+d x))+2 b B c+2 b B d x}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.038, size = 57, normalized size = 1.1 \begin{align*}{\frac{1}{d} \left ( Bb \left ({\frac{\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{2}}+{\frac{dx}{2}}+{\frac{c}{2}} \right ) +Ab\sin \left ( dx+c \right ) +aB\sin \left ( dx+c \right ) +aA \left ( dx+c \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.01024, size = 74, normalized size = 1.42 \begin{align*} \frac{4 \,{\left (d x + c\right )} A a +{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B b + 4 \, B a \sin \left (d x + c\right ) + 4 \, A b \sin \left (d x + c\right )}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.35626, size = 104, normalized size = 2. \begin{align*} \frac{{\left (2 \, A a + B b\right )} d x +{\left (B b \cos \left (d x + c\right ) + 2 \, B a + 2 \, A b\right )} \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.316311, size = 94, normalized size = 1.81 \begin{align*} \begin{cases} A a x + \frac{A b \sin{\left (c + d x \right )}}{d} + \frac{B a \sin{\left (c + d x \right )}}{d} + \frac{B b x \sin ^{2}{\left (c + d x \right )}}{2} + \frac{B b x \cos ^{2}{\left (c + d x \right )}}{2} + \frac{B b \sin{\left (c + d x \right )} \cos{\left (c + d x \right )}}{2 d} & \text{for}\: d \neq 0 \\x \left (A + B \cos{\left (c \right )}\right ) \left (a + b \cos{\left (c \right )}\right ) & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.36641, size = 61, normalized size = 1.17 \begin{align*} \frac{1}{2} \,{\left (2 \, A a + B b\right )} x + \frac{B b \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} + \frac{{\left (B a + A b\right )} \sin \left (d x + c\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]